﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MS.InformationManagement.Presenter.Support;
using MS.InformationManagement.Support;
using MS.InformationManagement.Support.Constants;

namespace MS.InformationManagement.Presenter.RequestInformation
{
    public class RequestInformationPresenter : BasePresenter<IRequestInformationView>
    {
        #region Constructors

        public RequestInformationPresenter(IRequestInformationView view) : base(view) { }

        #endregion

        #region Public Methods

        public void HandelLoad()
        {
            View.DepartmentUsers = new BLL.RequestInformation.RequestInformation().GetUsers();
                //PeopleHelper.GetUsersByProperty(GlobalConstants.UP_DEPARTMENT, PeopleHelper.GetPropertyCurrentUserProfile(GlobalConstants.UP_DEPARTMENT));

            //View.DepartmentUsers = BLL.SearchUser.SearchUser.GetUsersByPropertyAndRole(GlobalConstants.UP_DEPARTMENT, PeopleHelper.GetPropertyCurrentUserProfile(GlobalConstants.UP_DEPARTMENT), false, GlobalConstants.ROLE_INFORM);
            View.Show();
        }

        public void HandelRequestInformation()
        {
            new BLL.RequestInformation.RequestInformation().RequestInform(View.SelectedIds, View.SourceList, View.TargetUser);
            View.Success();
        }

        #endregion

    }
}
